package com.tripwego.client.event;

import com.google.gwt.event.shared.GwtEvent;
import com.tripwego.client.model.TripModel;

public class AddTripEvent extends GwtEvent<AddTripEventHandler> {

	public static Type<AddTripEventHandler> TYPE = new Type<AddTripEventHandler>();

	private TripModel TripModel;

	public AddTripEvent(TripModel TripModel) {
		this.TripModel = TripModel;
	}

	@Override
	public Type<AddTripEventHandler> getAssociatedType() {
		return TYPE;
	}

	@Override
	protected void dispatch(AddTripEventHandler handler) {
		handler.handleAddTripEvent(this);
	}

	/**
	 * @return the TripModel
	 */
	public TripModel getTripModel() {
		return TripModel;
	}

	/**
	 * @param TripModel
	 *            the TripModel to set
	 */
	public void setTripModel(TripModel TripModel) {
		this.TripModel = TripModel;
	}

}